package com.dgut.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * 账号表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//@TableName(resultMap="accountWithUserInfo")
public class Account {
    //让主键自增
    @TableId(type= IdType.AUTO)
    private Integer accountId;  //账号id
    private String username;  //账号名
    private String password;  //密码
    private Integer isLocked;  //是否锁定
    private String role;      //角色名
    private Date createTime;  //创建时间
    private Date updateTime;  //更新时间
    @TableLogic
    private Integer deleted;   //软删除 0-未删除 1-删除

    @TableField(exist = false)
    private UserInfo userInfo;  //账号信息
}
